// [test/stdx/shared_ptr/01/main.cpp].

/*
    (c) Copyright Alf P. Steinbach 2008.

    Testing std::shared_ptr

    Expected: compiles cleanly, with

    <output>
        Constructed
        Destroyed
    </output>
*/

#include    <alfs/stdx/memory.hpp>
#include    <iostream>

void say( char const s[] ) { std::cout << s << std::endl; }

struct Foo
{
    Foo() { say( "Constructed" ); }
    ~Foo() { say( "Destroyed" ); }
};

int main()
{
    std::shared_ptr<Foo>    p( new Foo );
}
